/* 
 * Copyright [2018] [Alex/libo(liboware@gmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyt.tomcat.config;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author LiBo/Alex
 * @since V1.0
 * @version V1.0 
 * 系统全局配置服务
 */
public interface GlobalConfiguration {
    
    /**
     * 默认读取tomcat配置文件目录文件
     */
    String DEFAULT_LOAD_TOMCAT_PROPERTIES_PATH= "application.properties";
    
    String DEFAULT_LOAD_TOMCAT_ENV_PREFIX = "TOMCAT_BOOT_";
    
    String DEFAULT_LOAD_CONFIG_TOMCAT_COMMAND = "tomcat.boot.";
    
    /***********************默认的参数默认值***********************************/
    
    Integer DEFAULT_PORT = 8080;
    
    String DEFAULT_CONTEXT_PATH = "/";

    String DEFAULT_HOST = "localhost";

    /**
     * 方法参数名称
     */
    List<String> PROPERTIES_CONFIGURATION = Stream.of(TomcatProperties.builder().getClass().
            getDeclaredFields()).map(param->param.getName()).collect(Collectors.toList());
    
}
